<script>
function report(message) {
  window.opener.postMessage(message, '*');
}

var xhr = new XMLHttpRequest();
xhr.onload = function() {
  report('FAIL: XHR succeeded unexpectedly');
}
xhr.onerror = function() {
  report('DONE');
};
xhr.open("POST", "http://example.test:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=*", true);
xhr.send("foo");
</script>
